<template>
  <el-dialog
    :visible.sync="visible"
    :before-close="beforeClose"
    :close-on-click-modal="false"
    append-to-body
    class="dialog-sm"
    top="30px"
    width="1000px"
  >
    <contract-registr
      :queryId="queryId"
      @success="handleSuccess"
      :viewMode="viewMode"
      @reget="handleReget"
      @close="beforeClose"
    ></contract-registr>
  </el-dialog>
</template>

<script>
import ContractRegistr from '@/credit/views/city/self/components/contractRegistr/ContractRegistr'
export default {
  components: {
    ContractRegistr,
  },
  props: {
    visible: Boolean,
    queryId: String,
    viewMode: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {}
  },

  created() {},
  methods: {
    beforeClose() {
      this.$emit('update:visible', false)
    },
    handleSuccess() {
      this.beforeClose()
      this.$emit('success', true)
    },
    handleReget() {
      this.$emit('success', true)
    },
  },
}
</script>
<style lang="scss" scoped></style>
